﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

//接口，接口和java一样可以多继承，实现类也需要实现父类接口
namespace IMyInterface2 {
    using System;

    interface IParentInterface {
        void ParentInterfaceMethod();
    }

    interface IMyInterface : IParentInterface {
        void MethodToImplement();
    }

    class InterfaceImplementer : IMyInterface {
        static void Main() {
            InterfaceImplementer iImp = new InterfaceImplementer();
            iImp.MethodToImplement();
            iImp.ParentInterfaceMethod();
            Console.ReadLine();
        }

        public void MethodToImplement() {
            Console.WriteLine("MethodToImplement() called.");
        }

        public void ParentInterfaceMethod() {
            Console.WriteLine("ParentInterfaceMethod() called.");
        }
    }
}
